module.exports = {
  outputDir: process.env.outputDir,
  assetsDir: 'static',
  publicPath: '/',
  devServer: {
    open: false,
    host: '0.0.0.0',
    port: 8001,
    https: false,
    hotOnly: false,
    //配置代理
    proxy: {
      //以'/api'开头的接口会转接到下面的target的ip
      // '/api': {
      //   target: 'http://127.0.0.1:3038', // target host
      //   changeOrigin: true, // needed for virtual hosted sites
      //   ws: true, // proxy websockets
      //   pathRewrite: {
      //     //路径重写
      //     '^/api': '/api/', // rewrite path
      //   },
      //   logLevel: 'debug'
      // },
      '/socket.io': {
        target: 'http://127.0.0.1:3038', // target host
        ws: true, // proxy websockets
        changeOrigin: true, // needed for virtual hosted sites
      },
      'sockjs-node': {
        target: 'http://127.0.0.1:3038',
        ws: false,
        changeOrigin: true
       },
    }
  }
}